import request from "@/utils/request";
import {AxiosPromise} from "axios";
import {BaseForm} from "@/api/base/types";
import {Result} from "@/model";


/**
 * 插入基本消息
 * @param data 条件
 * @return id
 */
export function insertBase(data: BaseForm): AxiosPromise<Result<number>> {
    return request({
        url: "/dome/base/add",
        method: "post",
        data,
    });
}

/**
 * 更新基本消息
 */
export function updateBase(data: BaseForm): AxiosPromise<Result<null>> {
    return request({
        url: "/dome/base/update",
        method: "put",
        data,
    });
}